import service from '@/utils/request'
// import qs from 'qs'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service

const request = {
    // 统一社会信用代码校验
    checkCode (code) {
        return httpGet({
            url: '/outer/outer/check/code',
            params: {
                code,
                type: 0
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    // 根据信用代码获取分包商所有信息
    creditcodeAllInfo (creditCode) {
        return httpGet({
            url: '/outer/subcontractor/find/by/subcontractor/creditcode/all/info',
            params: {
                creditCode
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    // 根据信用代码获取供应商所有信息
    supplierQuery (creditCode) {
        return httpGet({
            url: '/outer/supplier/find/by/creditcode/all/info',
            params: {
                creditCode
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    }
}

export default request
